home *** CD-ROM | disk | FTP | other *** search
- 0.KulkiRay - freeware raytracer by Grzegorz Tanski
-
- 1.Usage:
- Kray scene_filename [picture_filename]
-
- Default picture_filename is "rend.bmp". It may be changed by outputto command.
- Every instruction must be ended with ';'.
- Note that Kray loads all external files from current directory.
-
- 2.Instruction set
-
- "'"
- "%"
- "rem"
- "//"
- comment
-
- "end",
- ends script
-
- "echo |txt|"
- print |txt| on screen while reading scene file ex.:
- echo "Ala ma kota";
-
- "eval |expr|"
- print on screen value of expresion |expr| ex.:
- eval 2+2;
-
- "varible |new varible|,|expr|"
- means |symbol|=|expr| ex.
- varible a,10;
-
- "alias |symbol1|(alias_name),|symbol2|"
- makes an alias |symbol1| of symbol |symbol2|
-
- "object |shape|,|surface|,|blend|",
- adds object to a scene
-
- "light |light_kind|"
- adds a light to a scene |light_kind| can be:
- point,|vector|,|color|
- sharpspot,|vector1|(position),|vector2|(direction),|color|,|value|
- projector1,|vector|(position),|axes|(orientation),|bitmap|
- projector21col,|vector|(position),|axes|(orientation),|bitmap|,|color|
- projector21,|vector|(position),|axes|(orientation),|bitmap|
- projector22,|vector|(position),|axes|(orientation),|bitmap1|,|bitmap2|
- ambient,|color|
- parallel,|vector|(direction),|color|
- pointball,|vector|position,|color|,|axes|orientation,|expr|secondary rays x,|expr|secondary rays y,|expr|radius
- pointwall,|vector|position,|color|,|axes|orientation,|expr|secondary rays x,|expr|secondary rays y,|expr|size x,|expr|size y
- smapoint,|shadowmap|,|color|
- name,|light|
- fade2,|light|,|vector|pos,|expr|fade factor
- fadepoint,|vector|pos,|color|;
- fade,|light|
-
- "value |symbol|"
- shows a value of symbol |symbol|
-
- "color |new color|,r,g,b"
- makes a new color
-
- "vector |new vector|,x,y,z"
- defines |new vectir| as 3d vector
-
- "shape |new shape|,|shape_type|"
- makes |new shape| a shape.|shape_type| can be:
- wall,|vector|(position),|vector|(direction)
- sphere,|vector|(position),|expr|radius
- insphere,|vector|(position),|expr|radius
- triangle,|vector1|,|vector2|,|vector3|
- trimesh,|vector|(pos),|axes|(ori),|filename.lwob|
- inttrimesh,|vector|(pos),|axes|(ori),|expr|(max.smoothing angle),|filename.lwob|
- tube,|vector|(pos),|axes|(or),|expr|(radius),|expr|(len)
- cone,|vector|(pos),|axes|(or),|expr|,|expr|,|expr|
- paraboloid,|vector|(pos),|axes|(or),|expr|,|expr|,|expr|
- circle,|vector|(pos),|vector|(dir),|expr|(radius)
- square,|vector|(pos),|vector|(dx),|vector|(dy)
- and2,|shape|1,|shape|2
- or2,|shape|1,|shape|2
- sub2,|shape|1,|shape|2
- box,|vector|pos,|axes|,|expr|lenght,|expr|width,|expr|height
- eliptube,|vector|(pos),|axes|(or),|expr|radius1,|expr|radius2,|expr|(len)
- elipcone,|vector|(pos),|axes|(or),|expr|radius1,|expr|radius2,|expr|,|expr|
- elipparaboloid,|vector|(pos),|axes|(or),|expr|radius1,|expr|radius2,|expr|,|expr|
- neg,|shape|
-
- "axes |new axes|,xx,xy,xz,yx,yy,yz,zx,zy,zz"
- or
- "axes |symbol|,|vectorx|,|vectory|,|vectorz|"
- makes |new axes| a 3x3 matrix
-
- "eyeaxes |new axes|"
- makes |new axes| eye matrix;
-
- "hpbaxes |new axes|,|expr|h,|expr|p,|expr|b"
-
- "blend |new blend|,|blend_type|"
- makes |new blend| a blend.|blend_type| can be:
- total
- none
- partial,|color|filter
- superficial,|texture|
-
- "bitmap |new bitmap|,|text|filename"
- makes |new bitmap| a bitmap loaded from file filename
-
- "texture |new texture|,|texture_type|"
- defines symbol |new texture| as texture.|texture_type| can be:
- color,|color|
- bitmap,|mapping|,|bitmap|
- bitmapbness,|mapping|,|bitmap|,|expr|brightness
-
- "mapping |new mapping|"
- makes |new mapping| a mapping setting.|mapping_type| can be:
- rect,|vector|(dir x),|vector|(dir y),|vector|(positon)
- sphere,|vector|(pos),|axes|(orientation)
- tube,|vector|(pos),|axes|(orientation),|expr|(len y)
-
- "surface |new surface|,|surface_type|"
- makes |new surface| a surface.|surface_type| can be:
- shademetrefl,|texture|,|expr|(%shade),|expr|(%metal),|expr|(glossiness),|expr|(%specularity)
- zerotransglass,|texture|,|expr|(%shade),|expr|(%metal),|expr|(%trans),|expr|(glossiness),|expr|(%specularity)
- zeroglassmulti,|texture|,|expr|(%shade),|expr|(%metal),|color|(filter),|expr|(%trans),|expr|(glossiness),|expr|(%specularity)
- zerotransmulti,|texture|,|expr|(%shade),|expr|(%metal),|expr|(glass n),|expr|(%trans),|expr|(glossiness),|expr|(%specularity)
- shadereflect,|texture|,|expr|(%shade),|expr|(glossiness),|expr|(%specularity)
- multi,|texture|,|expr|(%shade),|expr|(%metal),|expr|(glass n),|color|(filter),|expr|(%trans),|expr|(glossiness),|expr|(%specularity)
- metalic
- shaded,|texture|
- default
- energetic,|texture|own_light,|texture|reflected_light,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor v0.91+
- smoothenergetic,|texture|own_light,|texture|reflected_light,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor v0.91+
- shenergetic,|texture|own_light,|texture|reflected_light,|texture|nonerg_lights_reflect,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor v0.91+
- shsmoothenergetic,|texture|own_light,|texture|reflected_light,|texture|nonerg_lights_reflect,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor v0.91+
- sdenergetic,|texture|own_light,|texture|reflected_light,|texture|nonerg_lights_reflect,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor v0.91+
- sdsmoothenergetic,|texture|own_light,|texture|reflected_light,|texture|nonerg_lights_reflect,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor v0.91+
- hybrid2,|surface|s1,|expr|%surface,|surface|s2,|expr|%surface2
- hybrid3,
- hybrid4,
- reflect,|expr|(glossiness)
- black,
- glasstransparnet,|expr|glassn,|color|transparentfilter
- glasstransparnet2,|expr|glassn,|color|transparentfilter
- colored,|texture|
- stransparent,|texture|filter_texture
- filtermetalic,|texture|filter
- sglasstransparent,|expr|n,|texture|filter
- in,|surface|
- out,|surface|
- shademap,|texture|,|bitmap|shademap picture,|expr|bmap nrightnes
- reflectmap,|texture|,|bitmap|shademap picture,|expr|bmap nrightnes
- envmap,|axes|orientation,|bitmap|envmap picture
- blurmetalic,|expr|blur,|expr|secondary rays
- blur,|surface|,|expr|blur,|expr|secondary rays
- filter,|surface|,|tecture|filter
- dside,|surface|
- stat,|texture|
- color,|texture|
- statreflect,|expr|blur_factor,|expr|no_of_rays;
-
- coscolor,|texture|
- qstat,|texture|
- qstatreflect,|expr|blur_factor,|expr|no_of_rays;
- pmcshaded,|texture|
- pmdirect,|texture|
- cshaded,|texture|
- gradcachetest
- nrgshaded2,|texture|,|expr|subfacesize
- nrgcshaded2,|texture|,|expr|subfacesize
- pmshaded,|texture|
- gstat,|texture|
- nrgshaded,|texture|,|expr|subfacesize
- nrgcshaded,|texture|,|expr|subfacesize
-
- "bump |surface|,|mapping|,|bitmap|,|expr|"
- adds bumping to surface |surface| using |mapping| and |bitmap|.|expr| is a depth of bumps (usually 1).
-
- "background |background_kind|"
- seta background.|background_kind| can be:
- color,|color|
- sky,|color1|,|color2|,|color3|,|vector|dir
- bitmap,|bitmap|,|vector1|,|vectpr2|
- bitmap2,|bitmap|,|bitmap|,|axes|
-
- "spot |vector|(pos),|axes|(ori),|expr|(angle),|color|(filter),|expr|(intensivity),|expr|(falloff)"
-
- "lightspot |vector|(pos),|axes|(ori),|expr|(angle),|color|(filter),|expr|(intensivity),|expr|(falloff)",
-
- "softlightspot |vector|(pos),|axes|(ori),|expr|(angle1),|expr|(angle2),|color|(filter),|expr|(intensivity),|expr|(falloff)",
-
- "camera |camera_type|",
- picture,|expr|(screen_width),|expr|(screen_height),|expr|(zoom),|vector|(pos),|axes|(ori)
- envmap,|expr|(screen_width),|expr|(screen_height),|vector|(pos),|axes|(ori)
-
- "antialias |expr|edge_detection_sensitivity,|expr|rays_per_pixel",
- antialiasing setting. if |expr1|=|expr2|=0 , no antialiasing
-
- "outputto |filename.bmp|"
- sets filename for image to save
-
- "energetic |expr|"
- sets number of iterations for energy matrix
-
- "recurse |expr|"
- sets numer of maximum depth of rays recursion
-
- "scale |vector,varible,matrix,color|,expr"
- scales an object for example a vector
-
- "shadowmap |new shadowmap|,|vector|position,|expr|size x,|expr|size y"
- defines new shadowmap.
-
- "enviroment |enviroment_definition|"
- adds enviroment effect to scene. |enviroment_definition| can be:
- fade,|expr|fade factor
- colorface,|color|color,|expr|fade factor
- veffect,|light|,|expr|intensivity,|expr|sampling start distance,|expr|samplig begin step,|expr|samplin end step,|expr|number of samples
-
- "lightdefine |new light|,|light_kind|"
- Defines |new light| as light. Opposite to "light" function it doesn't add light to scene. It only
- defines a new symbol that can be used in future.
-
- "otree |expr|max nodes,|expr|minimum objects for leaf"
- Defines octal trees scene decomposition depth.
-
- "objectset |object_set_definition|"
- adds set of objects to scene. Currently it is the best way to import lightwave objects to Kray.|object_set_definition| looks like this:
- |intrimesh|,|vector|position,|axes|orientation,|expr|max smothing angle,|surface|default surface,|blend|default blending
- you can optionally add definitions of surfaces (if objects has multiple surfaces)
- ,number,|expr|surface number,|surface|surface for this number,|blend|blend for this number
- or
- ,next,|surface|surface for next number,|blend|blend for next number
-
- "maxraycolor |expr|maxrays"
- Defines color which will be set if ray reach maximum recursion depth. Default value black (0,0,0)
-
- "statavg |expr|number_of_rays"
- Number of rays in all Monte Carlo computations for difusse surfaces.
-
- "causticspm |expr|number_of_photons,|expr|minimum_photons,|expr|start,|expr|stop,|expr|step,|expr|test;
- Defaines parameters for caustic photon map. In preprocessing step Kray sends number_of_photons to the scene.
- They hit surfaces and are stored. While rendering Kray tries to find photons that are
- nearest neighbours to intersection point. minimum_photons is a minimal number of
- neighbours that satisfy tracer. Searching is done by increasing radius of a sphere
- centered in intersection point and counting points inside a sphere. start,stop,step
- are parameters for searching. When caustics are rendered Kray does one step before
- searching it tests number of photons in sphere with radius test. If there are no photons
- searching is not done.
-
- "globalpm |expr|number_of_photons,|expr|minimum_photons,|expr|start,|expr|stop,|expr|step;
- See causticspm. Global photon map does not use testing.
-
- "outsidesize |expr|x"
- It defines resolution of 3d space. Ii is minimum distance between 2 separate shapes;
-
- "pixelorder |order|"
- Choses pixel order in rendering. You may choose between scanline,scanrow,random,progressive.
- Random or progressive pixel order are recomended if you are using meshless caching scheme
- (irradiance gradients).
-
- "pmcorner |expr|mindist,|expr|max_weight"
- Defines special conrer treating in photon mapping.
-
- 3. Basic data types
-
- |expr| - regural expresion such as 2+2
- |vector| - varible created by vector function or (x,y,z) ex. (100,200,0)
- |axes| - set of axes, created by eyeaxes,hpbaxes etc. function or <Heading,Pitching,Banking> in degrees ex.<90,0,0>
-
- 4. This file is only quick reference. To find out more about Kray visit www.kray.3d.pl.
- In case of any questions write to me: gtanski@elka.pw.edu.pl .If you want to support me
- somehow I would be very glad.
-